#include <iostream>

int main()
{
    int *p = new int[5]{1, 2, 3, 4, 5};
    int *reverse_p = new int[5];
    for(int i = 0; i < 5; i++)
    {
        // *(reverse_p+i) = *(p + 4-i);
        reverse_p[i] = p[4-i];
    }
    for(int i = 0; i< 5; i++)
    {
        std::cout << "array[" << i << "] = " << *(reverse_p + i) << std::endl;
    }

}